package com.ysqcould.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ysqcould.system.mapper.DictMapper;
import com.ysqcould.system.domain.AssDict;
import com.ysqcould.system.service.IDictService;

/**
 * 字典Service业务层处理
 * 
 * @author ruoyi
 * @date 2022-08-09
 */
@Service
public class DictServiceImpl implements IDictService 
{
    @Autowired
    private DictMapper dictMapper;

    /**
     * 查询字典
     * 
     * @param id 字典主键
     * @return 字典
     */
    @Override
    public AssDict selectDictById(Long id)
    {
        return dictMapper.selectDictById(id);
    }

    /**
     * 查询字典列表
     * 
     * @param dict 字典
     * @return 字典
     */
    @Override
    public List<AssDict> selectDictList(AssDict dict)
    {
        return dictMapper.selectDictList(dict);
    }

    /**
     * 新增字典
     * 
     * @param dict 字典
     * @return 结果
     */
    @Override
    public int insertDict(AssDict dict)
    {
        return dictMapper.insertDict(dict);
    }

    /**
     * 修改字典
     * 
     * @param dict 字典
     * @return 结果
     */
    @Override
    public int updateDict(AssDict dict)
    {
        return dictMapper.updateDict(dict);
    }

    /**
     * 批量删除字典
     * 
     * @param ids 需要删除的字典主键
     * @return 结果
     */
    @Override
    public int deleteDictByIds(Long[] ids)
    {
        return dictMapper.deleteDictByIds(ids);
    }

    /**
     * 删除字典信息
     * 
     * @param id 字典主键
     * @return 结果
     */
    @Override
    public int deleteDictById(Long id)
    {
        return dictMapper.deleteDictById(id);
    }
}
